<template>
	<view class="login">
		<view>
			<u--image src="/static/logo.png" width="158px" height="156px" shape="circle"></u--image>
		</view>
		<view>
			<u-subsection :list="list" :current="curNow" @change="sectionChange"></u-subsection>	
		</view>
		<view>
			<u--form
				labelPosition="left"
				:model="userInfo"
				:rules="rules"
				ref="uForm"
				>
				<u-form-item
					label="姓名"
					prop="name"
					borderBottom
					ref="item1"
				>
				<u--input v-model="userInfo.name" border="none"></u--input>
				</u-form-item>
				<u-form-item
					label="姓名"
					prop="name"
					borderBottom
					ref="item1"
				>
				<u--input v-model="userInfo.name" border="none"></u--input>
				</u-form-item>
			</u--form>
			<view>
				<text>注册账户</text>
				<text>忘记密码？</text>
			</view>
			<view>
				<u-radio-group v-model="value">
					<u-radio label=""></u-radio>我已阅读 用户手册 和 隐私政策
				</u-radio-group>
			</view>
			<view>
				<u-button type="primary" text="确定"></u-button>
			</view>
			<view>
				<u--image src="/static/login/weixin.png" width="285px" height="40px" ></u--image>
				<text>微信登录</text>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				list: ['账号登录', '手机号登录'],
				curNow: 0,
				userInfo: {
					name: '',
				},
				value:undefined,
				rules: {
					'name': {
						type: 'string',
						required: true,
						message: '请填写姓名',
						trigger: ['blur', 'change']
					},
				}
			}
		},
		onLoad() {

		},
		methods: {
			sectionChange(index) {
				this.curNow = index;
			}
		}
	}
</script>

<style>
	.login {
		width: 285px;
		margin: 0 auto;
		display: flex;
		flex-direction: column;
	}

	
</style>
